mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
fix: resolve 4 pre-existing test failures in channelserver
- Guard nil listener/acceptConns in Server.Shutdown() to prevent panic in test servers that don't bind a network listener - Remove redundant userBinaryPartsLock in TestHandleMsgMhfLoaddata that caused a deadlock with handleMsgMhfLoaddata's own lock acquisition - Increase test save blob size from 200 to 150000 bytes to accommodate ZZ save pointer offsets (up to 146728) - Initialize MHFEquipment.Sigils[].Effects slices in test data to prevent index-out-of-range panic in SerializeWarehouseEquipment - Insert warehouse row before updating it (UPDATE on 0 rows is not an error, so the INSERT fallback never triggered) - Use COALESCE for nullable kouryou_point column in kill counter test - Fix duplicate-add test expectation (CSV helper correctly deduplicates)
This commit is contained in:
@@ -223,9 +223,13 @@ func (s *Server) Shutdown() {
|
||||
s.isShuttingDown = true
|
||||
s.Unlock()
|
||||
|
||||
_ = s.listener.Close()
|
||||
if s.listener != nil {
|
||||
_ = s.listener.Close()
|
||||
}
|
||||
|
||||
close(s.acceptConns)
|
||||
if s.acceptConns != nil {
|
||||
close(s.acceptConns)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) acceptClients() {
|
||||
|
||||
Reference in New Issue
Block a user