mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
utils/conn: wsarecv error in windows means connection closed?
This commit is contained in:
parent
7f386fc042
commit
3b06d771ac
@ -143,8 +143,8 @@ func (c *Conn) Read(p []byte) (n int, err error) {
|
|||||||
func (c *Conn) ReadLine() (buff string, err error) {
|
func (c *Conn) ReadLine() (buff string, err error) {
|
||||||
buff, err = c.Reader.ReadString('\n')
|
buff, err = c.Reader.ReadString('\n')
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// wsarecv error in windows means connection closed
|
// wsarecv error in windows means connection closed?
|
||||||
if err == io.EOF || strings.Contains(err.Error(), "wsarecv: An existing connection was forcibly closed") {
|
if err == io.EOF || strings.Contains(err.Error(), "wsarecv") {
|
||||||
c.mutex.Lock()
|
c.mutex.Lock()
|
||||||
c.closeFlag = true
|
c.closeFlag = true
|
||||||
c.mutex.Unlock()
|
c.mutex.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user