X-Git-Url: http://www.git.cypherpunks.ru/?p=gocheese.git;a=blobdiff_plain;f=ucspi.go;h=1c6300b966a577027b5ead3e680b80aadf6d7967;hp=8fce33db8e726227babf533a3b0d6a08473434ab;hb=HEAD;hpb=168de6871afdd60f2bc1c529170033ef56307d7c diff --git a/ucspi.go b/ucspi.go index 8fce33d..488f308 100644 --- a/ucspi.go +++ b/ucspi.go @@ -1,19 +1,17 @@ -/* -GoCheese -- Python private package repository and caching proxy -Copyright (C) 2019-2021 Sergey Matveev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// GoCheese -- Python private package repository and caching proxy +// Copyright (C) 2019-2024 Sergey Matveev +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . package main @@ -27,7 +25,7 @@ import ( ) var ( - aLongTimeAgo = time.Unix(1, 0) + ALongTimeAgo = time.Unix(1, 0) UCSPIJob sync.WaitGroup ) @@ -91,7 +89,7 @@ func (conn *UCSPIConn) SetReadDeadline(t time.Time) error { // An ugly hack to forcefully terminate pending read. // net/http calls SetReadDeadline(aLongTimeAgo), but file // descriptors are not capable to exit immediately that way. - if t.Equal(aLongTimeAgo) { + if t.Equal(ALongTimeAgo) { conn.eof <- struct{}{} } return os.Stdin.SetReadDeadline(t)