remove error channel
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s

This commit is contained in:
matst80
2024-11-12 08:17:06 +01:00
parent f9c1c309b6
commit 498d221c9f
2 changed files with 0 additions and 8 deletions

View File

@@ -29,7 +29,6 @@ func (c *Client) Close() {
type CartTCPClient struct {
net.Conn
Errors chan error
ErrorCount int
address string
*CartPacketQueue
@@ -41,7 +40,6 @@ func NewCartTCPClient(address string) (*CartTCPClient, error) {
return nil, err
}
return &CartTCPClient{
Errors: make(chan error),
ErrorCount: 0,
Conn: connection,
address: address,
@@ -53,10 +51,7 @@ func (m *CartTCPClient) Connect() error {
if m.Conn == nil {
connection, err := net.Dial("tcp", m.address)
if err != nil {
m.Errors <- err
m.ErrorCount++
return err
}
m.ErrorCount = 0

View File

@@ -25,7 +25,6 @@ func Dial(address string) (*Client, error) {
type TCPClient struct {
net.Conn
Errors chan error
ErrorCount int
address string
*PacketQueue
@@ -37,7 +36,6 @@ func NewTCPClient(address string) (*TCPClient, error) {
return nil, err
}
return &TCPClient{
Errors: make(chan error),
ErrorCount: 0,
Conn: connection,
address: address,
@@ -59,7 +57,6 @@ func (m *TCPClient) Connect() error {
func (m *TCPClient) HandleConnectionError(err error) error {
if err != nil {
m.Errors <- err
m.ErrorCount++
}
return err