Thu, 23 Mar 2023 12:14:53 +0000
client: Fix timeout handling
Previously, the timeout handler would fire an error that would get caught and
logged by the timer code. However that error never reached the upper levels of
scansion, leading to the whole thing just hanging.
Now we just trigger resumption of the async runner, and throw the error from
there if we haven't received the stanza yet.
With this change, timeouts are now correctly handled and reported as failures.
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | include config.unix |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | ifndef SQUISH |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | $(error Please run ./configure first) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | endif |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 | SOURCE_FILES=$(shell $(SQUISH) --list-files) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | MISSING_FILES=$(shell $(SQUISH) --list-missing-files) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 | |
142
13892b175f06
Makefile: Build with server by default
Matthew Wild <mwild1@gmail.com>
parents:
122
diff
changeset
|
10 | SQUISH_PARAMS=--with-verse --with-server |
122
709d5bb0acb4
Makefile; Factor out squish params and build with verse by default
Matthew Wild <mwild1@gmail.com>
parents:
119
diff
changeset
|
11 | |
75
68259c995b56
Makefile: Automatically create build directory if it doesn't exist
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
12 | OUTPUT=build/scansion |
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | BIN_DIR=$(PREFIX)/bin |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | all: $(OUTPUT) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | |
75
68259c995b56
Makefile: Automatically create build directory if it doesn't exist
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
18 | $(OUTPUT): build squishy $(SOURCE_FILES) |
122
709d5bb0acb4
Makefile; Factor out squish params and build with verse by default
Matthew Wild <mwild1@gmail.com>
parents:
119
diff
changeset
|
19 | $(SQUISH) $(SQUISH_PARAMS) --output=$(OUTPUT) |
75
68259c995b56
Makefile: Automatically create build directory if it doesn't exist
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
20 | |
68259c995b56
Makefile: Automatically create build directory if it doesn't exist
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
21 | build: |
68259c995b56
Makefile: Automatically create build directory if it doesn't exist
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
22 | mkdir build |
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 | install: $(OUTPUT) |
169
ecae87f5aaba
Makefile: make scansion executable for the poor owner, too
Jonas Sch?fer <jonas@wielicki.name>
parents:
165
diff
changeset
|
25 | install -t $(BIN_DIR) -m 755 $^ |
74
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 | |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 | clean: |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 | rm $(OUTPUT) |
b3f2711684a7
Add Makefile and other files for building
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 | |
119 | 30 | test: |
31 | busted | |
32 | ||
165
92e1733243d5
Makefile: Add docker target
Matthew Wild <mwild1@gmail.com>
parents:
142
diff
changeset
|
33 | docker: |
92e1733243d5
Makefile: Add docker target
Matthew Wild <mwild1@gmail.com>
parents:
142
diff
changeset
|
34 | docker build -t scansion . |
92e1733243d5
Makefile: Add docker target
Matthew Wild <mwild1@gmail.com>
parents:
142
diff
changeset
|
35 | |
92e1733243d5
Makefile: Add docker target
Matthew Wild <mwild1@gmail.com>
parents:
142
diff
changeset
|
36 | .PHONY: all clean install docker test clean |